<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.cmccsi.mapper.qxgroupDtoMapper" >
  <resultMap id="BaseResultMap" type="com.cmccsi.entity.qxgroupDto" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="creator_id" property="creatorId" jdbcType="BIGINT" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="domainid" property="domainid" jdbcType="VARCHAR" />
    <result column="grouptype" property="grouptype" jdbcType="INTEGER" />
    <result column="status" property="status" jdbcType="INTEGER" />
    <result column="bulletin" property="bulletin" jdbcType="VARCHAR" />
    <result column="version" property="version" jdbcType="BIGINT" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  </resultMap>

  <sql id="Base_Column_List" >
    id, creator_id, name, domainid, grouptype, status, bulletin, version, create_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from qxgroup
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from qxgroup
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.cmccsi.entity.qxgroupDto" >
    insert into qxgroup (id, creator_id, name, 
      domainid, grouptype, status, 
      bulletin, version, create_time
      )
    values (#{id,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, 
      #{domainid,jdbcType=VARCHAR}, #{grouptype,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
      #{bulletin,jdbcType=VARCHAR}, #{version,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.cmccsi.entity.qxgroupDto" >
    insert into qxgroup
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="creatorId != null" >
        creator_id,
      </if>
      <if test="name != null" >
        name,
      </if>
      <if test="domainid != null" >
        domainid,
      </if>
      <if test="grouptype != null" >
        grouptype,
      </if>
      <if test="status != null" >
        status,
      </if>
      <if test="bulletin != null" >
        bulletin,
      </if>
      <if test="version != null" >
        version,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="creatorId != null" >
        #{creatorId,jdbcType=BIGINT},
      </if>
      <if test="name != null" >
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="domainid != null" >
        #{domainid,jdbcType=VARCHAR},
      </if>
      <if test="grouptype != null" >
        #{grouptype,jdbcType=INTEGER},
      </if>
      <if test="status != null" >
        #{status,jdbcType=INTEGER},
      </if>
      <if test="bulletin != null" >
        #{bulletin,jdbcType=VARCHAR},
      </if>
      <if test="version != null" >
        #{version,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert> 
  <update id="updateByPrimaryKeySelective" parameterType="com.cmccsi.entity.qxgroupDto" >
    update qxgroup
    <set >
      <if test="creatorId != null" >
        creator_id = #{creatorId,jdbcType=BIGINT},
      </if>
      <if test="name != null" >
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="domainid != null" >
        domainid = #{domainid,jdbcType=VARCHAR},
      </if>
      <if test="grouptype != null" >
        grouptype = #{grouptype,jdbcType=INTEGER},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="bulletin != null" >
        bulletin = #{bulletin,jdbcType=VARCHAR},
      </if>
      <if test="version != null" >
        version = #{version,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.cmccsi.entity.qxgroupDto" >
    update qxgroup
    set creator_id = #{creatorId,jdbcType=BIGINT},
      name = #{name,jdbcType=VARCHAR},
      domainid = #{domainid,jdbcType=VARCHAR},
      grouptype = #{grouptype,jdbcType=INTEGER},
      status = #{status,jdbcType=INTEGER},
      bulletin = #{bulletin,jdbcType=VARCHAR},
      version = #{version,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>